package com.inlycat.test.mapper;

import java.io.IOException;
import java.io.Reader;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

/**
 * @author jarvan4dev@163.com
 * @since 2015年8月18日下午2:30:58
 * @category 
 **/
public class Base {
	
	protected SqlSession sqlSession;

	public Base() throws IOException {
		Reader reader = Resources.getResourceAsReader("mybatis-config.xml");
		SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader);
		sqlSession = factory.openSession();
	}
	
	

}
